﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _11_Console
{
    internal class MyDbContext
    {
        private static MyDbContext dbContext = null;

        public MyDbContext DbContext
        {
            get { return dbContext; }
        }
        
        // 单例设计模式
        private MyDbContext()
        {

        }
        static MyDbContext()
        {
           dbContext = new MyDbContext();
        }
    }
}
